<template>
  <router-view></router-view>
</template>

<script>
import { Look } from "./api/User-api";
import { mapState } from "vuex"
import {SUCCESS} from "./store/mutaions_type"
export default {
  created() {
    Look().then(res => {
      if (res.code == 0) {
        this.$store.commit(SUCCESS, {
          Whether: res.code
        });
          console.log(res);
      } else {
        this.$store.commit(SUCCESS, {
          Whether: res.code
        });
        console.log(res.code);
      }
    });
  },
  computed: {
    ...mapState({
      Whether: "Whether"
    })
  }
};
</script>
<style lang="less">
</style>
